﻿using System.Text.Json.Serialization;

namespace Sgr.UPMS.Application.ViewModels
{
    /// <summary>
    /// 用户权限信息
    /// </summary>
    public class OutUserPermissionViewModel
    {
        /// <summary>
        /// 用户标识
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 真实姓名（姓名为空时默认显示登录账号）
        /// </summary>
        public string RealName { get; set; } = string.Empty;

        /// <summary>
        /// 所属部门标识
        /// </summary>
        public long? DepartmentId { get; set; }

        /// <summary>
        /// 是否超级管理员
        /// </summary>
        public bool IsSuperAdmin { get; set; }

        /// <summary>
        /// 所属组织标识
        /// </summary>
        public long OrgId { get; set; }

        /// <summary>
        /// 拥有的资源集合
        /// </summary>
        public HashSet<string> Permissions { get; set; } = new();

        /// <summary>
        /// 资源集合特征
        /// </summary>
        public string PermissionKey { get; set; } = string.Empty;
    }
}